package com.scott.hello;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 黄后林
 * @version 1.0
 * @note
 * @date 2021-12-21 15:27:04
 */
@RestController
public class HelloController {


    // 让name= application.properties中 student.name = hy

    @Value("${student.name}")
    private String name;


    // http://localhost:8080/nacos
    @GetMapping("nacos")
    public String hello(){
        return "hello " + name;
    }
}
